package com.luyuan.gallery.vo;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.luyuan.common.annotation.Excel;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import java.util.Date;
import java.io.Serializable;

/**
 * 评论VO对象（用于视图展示）
 * 
 * @author luyuan
 * @date 2025-11-07
 */
public class CommentVO implements Serializable
{
    /** 主键ID */
    private Long id;

    /** 评论目标id */
    @Excel(name = "评论目标id")
    private String targetId;

    /** 评论人id */
    @Excel(name = "评论人id")
    private Long commentUserId;

    /** 评论人昵称 */
    @Excel(name = "评论人昵称")
    private String commentUserName;

    /** 评论人头像 */
    @Excel(name = "评论人头像")
    private String commentUserAvatar;

    /** 所属评论id，主评论为null */
    @Excel(name = "所属评论id，主评论为null")
    private Long parentId;

    /** 评论内容 */
    @Excel(name = "评论内容")
    private String content;

    /** 点赞数量 */
    @Excel(name = "点赞数量")
    private Long like;

    /** 状态，0-未审核，1-展现，2-审核驳回，3-已删除 */
    @Excel(name = "状态", readConverterExp = "0=未审核,1=展现,2=审核驳回,3=已删除")
    private Integer status;

    /** 创建时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date createTime;

    public void setId(Long id) 
    {
        this.id = id;
    }

    public Long getId() 
    {
        return id;
    }
    public void setTargetId(String targetId) 
    {
        this.targetId = targetId;
    }

    public String getTargetId() 
    {
        return targetId;
    }
    public void setCommentUserId(Long commentUserId) 
    {
        this.commentUserId = commentUserId;
    }

    public Long getCommentUserId() 
    {
        return commentUserId;
    }
    public void setCommentUserName(String commentUserName) 
    {
        this.commentUserName = commentUserName;
    }

    public String getCommentUserName() 
    {
        return commentUserName;
    }
    public void setCommentUserAvatar(String commentUserAvatar) 
    {
        this.commentUserAvatar = commentUserAvatar;
    }

    public String getCommentUserAvatar() 
    {
        return commentUserAvatar;
    }
    public void setParentId(Long parentId) 
    {
        this.parentId = parentId;
    }

    public Long getParentId() 
    {
        return parentId;
    }
    public void setContent(String content) 
    {
        this.content = content;
    }

    public String getContent() 
    {
        return content;
    }
    public void setLike(Long like) 
    {
        this.like = like;
    }

    public Long getLike() 
    {
        return like;
    }
    public void setStatus(Integer status) 
    {
        this.status = status;
    }

    public Integer getStatus() 
    {
        return status;
    }
    public void setCreateTime(Date createTime) 
    {
        this.createTime = createTime;
    }

    public Date getCreateTime() 
    {
        return createTime;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("targetId", getTargetId())
            .append("commentUserId", getCommentUserId())
            .append("commentUserName", getCommentUserName())
            .append("commentUserAvatar", getCommentUserAvatar())
            .append("parentId", getParentId())
            .append("content", getContent())
            .append("like", getLike())
            .append("status", getStatus())
            .append("createTime", getCreateTime())
            .toString();
    }
}